Selects the given layer.